package cn.jiyun.controller;

import cn.jiyun.dto.TrainDTO;
import cn.jiyun.feign.TrainFeign;
import cn.jiyun.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 季乾帅
 * @create 2023/9/5 15:40
 */
@RestController
@RequestMapping("train")
public class TrainController {
    @Autowired
    private TrainFeign trainFeign;

    @PostMapping("/findMyTrain")
    public Result findMyTrain(String userId, @RequestBody TrainDTO dto) {
        return trainFeign.findMyTrain(userId, dto);
    }
}
